﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel.Security;
using System.ServiceModel;
using System.IdentityModel.Policy;

namespace ConsoleApplication3
{
	class MyIdentityVerifier : IdentityVerifier
	{
		IdentityVerifier defaultVerifier;

		public MyIdentityVerifier()
		{
			this.defaultVerifier = IdentityVerifier.CreateDefault();
		}

		public override bool CheckAccess(EndpointIdentity identity,
			AuthorizationContext authContext)
		{
		
			// The following implementation is for demonstration only, and
			// does not perform any checks regarding EndpointIdentity.
			// Do not use this for production code.
			return true;
		}

		public override bool TryGetIdentity(EndpointAddress reference,
			out EndpointIdentity identity)
		{
			return this.defaultVerifier.TryGetIdentity(reference, out identity);
		}
	}



}
